package cubelabs.nexus.dao;

import java.util.List;

import org.hibernate.criterion.Restrictions;
import org.springframework.stereotype.Repository;

import cubelabs.nexus.entity.SkillClassified;

@Repository("skillClassifiedDAO")
public class SkillClassifiedDAO extends BaseDAO<SkillClassified, Long>{

	public List<SkillClassified> findAllClassifiedsByUser(long userId) {
		return findByCriteria(Restrictions.eq("user.id", userId));
	}

	public List<SkillClassified> findAllClassifiedsByCategory(long categoryId) {
		return findByCriteria(Restrictions.eq("category.id", categoryId));
	}
}
